You are here: Symbol Reference > Dew Namespace > Dew.Signal Namespace > Dew.Signal.Units Namespace > Classes > LinearSystems Class > LinearSystems Methods > LowpassToLowpassZ Method > LinearSystems.LowpassToLowpassZ Method ([In] TVec, [In] TVec, double, double, double)
Dew Signal for .NET
ContentsIndexHome
PreviousUpNext
LinearSystems.LowpassToLowpassZ Method ([In] TVec, [In] TVec, double, double, double)

The function returns modified z (zeros), p (poles) and k (gain).

Syntax
C#
Visual Basic
public static void LowpassToLowpassZ([In] TVec z, [In] TVec p, ref double k, double Freq, double PrototypeFreq);

Elliptic lowpass filter design. The cutoff frequency of an analog filter prototype transformed in to z domain is obtained with BilinearUnwarp method. The analog prototype filter has a normalized cutoff frequency at 1 rad/sec.

using Dew.Math; using Dew.Math.Editors; using Dew.Math.Units; using Dew.Signal; using Dew.Signal.Units; using Dew.Math.Tee; using Dew.Signal.Tee; private void button1_Click(object sender, EventArgs e) { Vector z = new Vector(0); Vector p = new Vector(0); Vector num = new Vector(0); Vector den = new Vector(0); Vector Response = new Vector(0); double k, Wc; double FS = 2; int Order = 4; //design a fifth order filter. IIRFilters.EllipticAnalog(Order,0.1,30, z, p, out k); //design analog protype LinearSystems.Bilinear(z, p, ref k, FS,true); Wc = 0.5; LinearSystems.LowpassToLowpassZ(z, p, ref k, Wc, LinearSystems.BilinearUnwarp(1,FS)); LinearSystems.ZeroPoleToTransferFun(num,den, z, p, k); SignalUtils.FrequencyResponse(num, den, Response, 64, false, TSignalWindowType.wtRectangular, 0); //zero padding set to 64 //Alternative: // ... // LinearSystems.ZeroPoleToTransferFun(num,den, z, p, k); // LinearSystems.LowpassToLowpassZ(num,den, Wc, LinearSystems.BilinearUnwarp(1,FS)); MtxVecTee.DrawIt(Response, "Frequency response", false); //MtxVecTee.DrawIt(20 * MtxExpr.Log10(MtxExpr.Abs(Response)), "Magnitude", false); //MtxVecTee.DrawIt(MtxExpr.PhaseSpectrum(Response) * (180 / Math.PI), "Phase", false); }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!